<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://iosr11.ui.tags/studentInfo" prefix="g" %>

<h:form>
	<g:studentInfo student="#{currentUser.student}" />
	<h:dataTable value="#{currentUser.student.grades}" var="ocena"  headerClass="tableHeader" styleClass="dataTable" rowClasses="oddRow, evenRow">
		<h:column>
			<f:facet name="header">
				<h:outputText value="Data" />
			</f:facet>
				<h:outputText value="#{ocena.date}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Prowadzacy" />
			</f:facet>
				<h:outputText value="#{ocena.teacher.name}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Ocena" />
			</f:facet>
				<h:outputText value="#{ocena.grade}" />
		</h:column>
		<h:column>
			<f:facet name="header">
				<h:outputText value="Punkty" />
			</f:facet>
				<h:outputText value="#{ocena.points}" />
		</h:column>
	</h:dataTable>
</h:form>